package com.guaju.yueshangLife.activity.setting;

import android.content.Intent;
import android.databinding.DataBindingUtil;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;

import com.guaju.yueshangLife.R;
import com.guaju.yueshangLife.base.BaseActivity;
import com.guaju.yueshangLife.databinding.ActivityEditTelnumBinding;
import com.guaju.yueshangLife.utils.PreferenceUtil;

public class EditTelnumActivity extends BaseActivity {


    private ActivityEditTelnumBinding binding;

    @Override
    protected void loadViewLayout() {
        binding = DataBindingUtil.setContentView(this, R.layout.activity_edit_telnum);
        binding.avatar.setImageURI(PreferenceUtil.getAvatar());
        String fphone = PreferenceUtil.getFphone();
        if ((!TextUtils.isEmpty(fphone)) && fphone.length() == 11) {
            String screteTel = fphone.substring(0, 3) + "****" + fphone.substring(7, 11);
            binding.tel.setText(screteTel);
        }

    }

    @Override
    protected void bindViews() {

    }

    @Override
    protected void processLogic(Bundle savedInstanceState) {

    }

    @Override
    protected void setListener() {
        binding.btSubmit.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(EditTelnumActivity.this, NotifyTelnumActivty.class);
                startActivity(intent);
            }
        });

    }
}
